﻿using DXApplicationTangche.UC.面料审核.Service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DXApplicationTangche.UC.金蝶.dto
{
    class PurchaseOrderDTO
    {
        public class FBillTypeID
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNUMBER { get; set; }
        }

        public class FSupplierId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
            public FSupplierId(String FSupplierId)
            {
                this.FNumber = FSupplierId;
            }
        }

        public class FPurchaseDeptId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FPurchaserGroupId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FPurchaserId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FProviderId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FProviderContactId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FCONTACTNUMBER { get; set; }
        }

        public class FSettleId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FChargeId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FConfirmerId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FUserID { get; set; }
        }

        public class FSettleModeId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FPayConditionId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FSettleCurrId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FExchangeTypeId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FPriceListId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FDiscountListId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FLocalCurrId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FPayAdvanceBillId
        {
        }

        public class FPOOrderFinance
        {
            /// <summary>
            /// 
            /// </summary>
            public int FEntryId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FSettleModeId FSettleModeId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FPayConditionId FPayConditionId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FSettleCurrId FSettleCurrId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FExchangeTypeId FExchangeTypeId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FExchangeRate { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FPriceListId FPriceListId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FDiscountListId FDiscountListId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FPriceTimePoint { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FIsIncludedTax { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FISPRICEEXCLUDETAX { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FLocalCurrId FLocalCurrId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FPayAdvanceBillId FPayAdvanceBillId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FPAYADVANCEAMOUNT { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FSupToOderExchangeBusRate { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FSEPSETTLE { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FDepositRatio { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FAllDisCount { get; set; }
        }

        public class FClauseId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FPOOrderClauseItem
        {
            /// <summary>
            /// 
            /// </summary>
            public int FEntryID { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FClauseId FClauseId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FClauseDesc { get; set; }
        }

        public class FMaterialId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
            public FMaterialId()
            {

            }

        }

        public class FBomId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FAuxPropId
        {
        }

        public class FUnitId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FPriceUnitId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FTaxCombination
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FRequireDeptId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FRequireStaffId
        {
        }

        public class FReceiveDeptId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNUMBER { get; set; }
        }

        public class FStockUnitID
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FLot
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FProcesser
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FEntrySettleModeId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FLocationId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FSalUnitID
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FSetPriceUnitID
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FChargeProjectID
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FDeliveryStockStatus
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FELocationId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FEntryDeliveryPlanItem
        {
            /// <summary>
            /// 
            /// </summary>
            public int FDetailId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FDeliveryDate_Plan { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FPlanQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FELocation { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FELocationAddress { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FSUPPLIERDELIVERYDATE { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FPREARRIVALDATE { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FTRLT { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FConfirmDeliQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FConfirmDeliDate { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FConfirmInfo { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FELocationId FELocationId { get; set; }
        }

        public class FTaxRateId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FTaxDetailSubEntityItem
        {
            /// <summary>
            /// 
            /// </summary>
            public int FDetailID { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FTaxRateId FTaxRateId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FTaxRate { get; set; }
        }

        public class FPOOrderEntryItem
        {
            /// <summary>
            /// 
            /// </summary>
            public int FEntryID { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FProductType { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FMaterialId FMaterialId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FBomId FBomId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FMaterialDesc { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FAuxPropId FAuxPropId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FUnitId FUnitId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public Double FQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FPriceUnitId FPriceUnitId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public Double FPriceUnitQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FPriceBaseQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FDeliveryDate { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FLocation { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FLocationAddress { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FPrice { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FTaxPrice { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FEntryDiscountRate { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FTaxCombination FTaxCombination { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FEntryTaxRate { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FRequireDeptId FRequireDeptId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FRequireStaffId FRequireStaffId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FReceiveDeptId FReceiveDeptId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FGiveAway { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FEntryNote { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FSupMatId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FSupMatName { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FStockUnitID FStockUnitID { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public Double FStockQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public Double FStockBaseQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FLot FLot { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FSupplierLot { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FProcesser FProcesser { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FDeliveryControl { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FTimeControl { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FDeliveryMaxQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FDeliveryMinQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FDeliveryBeforeDays { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FDeliveryDelayDays { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FDeliveryEarlyDate { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FDeliveryLastDate { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FPriceCoefficient { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FEntrySettleModeId FEntrySettleModeId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FConsumeSumQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FContractNo { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FReqTraceNo { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FMtoNo { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FDEMANDTYPE { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FDEMANDBILLNO { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FDEMANDBILLENTRYSEQ { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FDEMANDBILLENTRYID { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FLocationId FLocationId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FPlanConfirm { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FSalUnitID FSalUnitID { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public Double FSalQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FSalJoinQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FBaseSalJoinQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FSetPriceUnitID FSetPriceUnitID { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FInventoryQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FChargeProjectID FChargeProjectID { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FGroup { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FDeliveryStockStatus FDeliveryStockStatus { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FMaxPrice { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FMinPrice { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FIsStock { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FBaseConsumeSumQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public Double FSalBaseQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FPriceDiscount { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FAllAmountExceptDisCount { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FSTOCKBASEFINAPQTY { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public List<FEntryDeliveryPlanItem> FEntryDeliveryPlan { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public List<FTaxDetailSubEntityItem> FTaxDetailSubEntity { get; set; }
            public FPOOrderEntryItem(String FMaterialId,Double FQty)
            {
                this.FQty = FQty;
                this.FSalQty = FQty;
                this.FSalBaseQty = FQty;
                this.FStockQty = FQty;
                this.FStockBaseQty = FQty;
                this.FMaterialId = new FMaterialId();
                this.FMaterialId.FNumber = FMaterialId;
            }
            public FPOOrderEntryItem()
            {

            }
        }

        public class FPayMaterialId
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNUMBER { get; set; }
        }

        public class FPAYPLANPRICEUNITID
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FBasePriceUnit
        {
            /// <summary>
            /// 
            /// </summary>
            public string FNumber { get; set; }
        }

        public class FPayAuxPropId
        {
        }

        public class FOrderActualPaySubEntityItem
        {
            /// <summary>
            /// 
            /// </summary>
            public int FDetailID { get; set; }
        }

        public class FIinstallmentItem
        {
            /// <summary>
            /// 
            /// </summary>
            public int FENTRYID { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FYFDATE { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FYFRATIO { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FYFAMOUNT { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FISPREPAYMENT { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FInsPrepaidAmount { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FRemarks { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FPayMaterialId FPayMaterialId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FMATERIALSEQ { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FPayPlanQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FPayPlanPrice { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FPURCHASEORDERNO { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FOrderEntryId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FinsPayAdvanceRate { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FInsPayAdvanceAmount { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FPAYPLANPRICEUNITID FPAYPLANPRICEUNITID { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FBasePriceUnit FBasePriceUnit { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FPayMaterialDesc { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public int FBasePayPlanQty { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FPayAuxPropId FPayAuxPropId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public List<FOrderActualPaySubEntityItem> FOrderActualPaySubEntity { get; set; }
        }

        public class Model
        {
            /// <summary>
            /// 
            /// </summary>
            public int FID { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FBillTypeID FBillTypeID { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FBillNo { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FDate { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FSupplierId FSupplierId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FPurchaseDeptId FPurchaseDeptId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FPurchaserGroupId FPurchaserGroupId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FPurchaserId FPurchaserId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FProviderId FProviderId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FProviderContactId FProviderContactId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FProviderAddress { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FSettleId FSettleId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FChargeId FChargeId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FConfirmerId FConfirmerId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FConfirmDate { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FProviderContact { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FIsModificationOperator { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FChangeStatus { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string FACCTYPE { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public FPOOrderFinance FPOOrderFinance { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public List<FPOOrderClauseItem> FPOOrderClause { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public List<FPOOrderEntryItem> FPOOrderEntry { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public List<FIinstallmentItem> FIinstallment { get; set; }
            /// <summary>
            /// 保存采购订单
            /// </summary>
            /// <param name="fSupplierId">供应商</param>
            /// <param name="purchaseChildDTOs">采购子项</param>
            public Model(String fSupplierId, List<MaterialPurchaseDetailDTO> materialPurchaseDetailDTOs)
            {
                this.FSupplierId = new FSupplierId(fSupplierId);
                this.FPOOrderEntry = new List<FPOOrderEntryItem>();
                foreach (MaterialPurchaseDetailDTO materialPurchaseDetailDTO in materialPurchaseDetailDTOs)
                {
                    this.FPOOrderEntry.Add(new FPOOrderEntryItem(materialPurchaseDetailDTO.fnumber, materialPurchaseDetailDTO.fqty));
                }
            }
        }

        public class PurchaseOrderRoot
        {
            /// <summary>
            /// 
            /// </summary>
            public List<string> NeedUpDateFields { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public List<string> NeedReturnFields { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string IsDeleteEntry { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string SubSystemId { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string IsVerifyBaseDataField { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string IsEntryBatchFill { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string ValidateFlag { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string NumberSearch { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string IsAutoAdjustField { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string InterationFlags { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public string IgnoreInterationFlag { get; set; }
            /// <summary>
            /// 
            /// </summary>
            public Model Model { get; set; }
            /// <summary>
            /// 
            /// </summary>
            /// <param name="FSupplierId">供应商number</param>
            /// <param name="purchaseChildDTOs">采购单子项</param>
            public PurchaseOrderRoot(String FSupplierId,List<MaterialPurchaseDetailDTO> materialPurchaseDetailDTOs)
            {
                this.Model = new Model(FSupplierId, materialPurchaseDetailDTOs);
            }
        }
    }
    public class PurchaseChildDTO
    {
        public int fmaterialid { get; set; }//面料id
        public String fname { get; set; }//面料号

        public String MaterialChildId { get; set; }//面料fnumber
        //采购数量
        public Double FQty { get; set; }//数量
        public PurchaseChildDTO(int fmaterialid, String fname,String MaterialChildId, Double FQty)
        {
            this.fmaterialid = fmaterialid;
            this.fname = fname;
            this.MaterialChildId = MaterialChildId;
            this.FQty = FQty;
        }
        public PurchaseChildDTO(String MaterialChildId, Double FQty)
        {
            this.MaterialChildId = MaterialChildId;
            this.FQty = FQty;
        }
        public PurchaseChildDTO()
        {

        }
    }
}
